<extend name="Public/base" />

<block name="body">

    <div class="cf">
        <div class="fl">
            <!--<button class="btn ajax-post" url="{:U('User/changeStatus',array('method'=>'resumeUser'))}" target-form="ids">启 用</button>
            <button class="btn ajax-post" url="{:U('User/changeStatus',array('method'=>'forbidUser'))}" target-form="ids">禁 用</button>-->
            <!-- <button class="btn ajax-post confirm" url="{:U('User/changeStatus',array('method'=>'deleteUser'))}" target-form="ids">删 除</button> -->
        </div>

        <!-- 高级搜索 -->
        <div class="search-form fr cf">
            <div class="fl">
                <select name="month">
                    <option value="01">1月</option>
                    <option value="02">2月</option>
                    <option value="03">3月</option>
                    <option value="04">4月</option>
                    <option value="05">5月</option>
                    <option value="06">6月</option>
                    <option value="07">7月</option>
                    <option value="08">8月</option>
                    <option value="09">9月</option>
                    <option value="10">10月</option>
                    <option value="44">11月</option>
                    <option value="12">12月</option>
                </select>
            </div>
            <div class="sleft">
                <a class="sch-btn" href="javascript:;" id="search" url="{:U('index')}"><i class="btn-search"></i></a>
            </div>
        </div>
    </div>
    <!-- 数据列表 -->
    <div class="data-table table-striped">
            <div id="chart2"></div>
    </div>
    <div style="text-align:center;margin:50px 0; font:normal 14px/24px 'MicroSoft YaHei';"/>

</block>

<block name="script">
    <script src="__STATIC__/thinkbox/jquery.thinkbox.js"></script>
    <script type="text/javascript" src="__STATIC__/jqplot/jQuery.js"></script>
    <script type="text/javascript" src="__STATIC__/jqplot/jqplot.js"></script>
    <script type="text/javascript">
        $(document).ready(function() {

            var data = [[{$nums}]];
            var data_max = {$max}; //Y轴最大刻度
            var line_title = ["下注量"]; //曲线名称
            var y_label = "下注总量（单位万）"; //Y轴标题
            var x_label = "日期"; //X轴标题
            var x = [{$date}]; //定义X轴刻度值
            var title = "平台盈利统计"; //统计图标标题
            //j.jqplot.diagram.base("chart1", data, line_title, "这是统计标题", x, x_label, y_label, data_max, 1);
            j.jqplot.diagram.base("chart2", data, line_title, "平台盈利统计", x, x_label, y_label, data_max, 2);
        });
    </script>

    <script type="text/javascript">
        $(function(){
            //搜索功能
            $("#search").click(function(){
                var url = $(this).attr('url');
                var status = $("#sch-sort-txt").attr("data");
                var query  = $('.search-form').find('select').serialize();
                query = query.replace(/(&|^)(\w*?\d*?\-*?_*?)*?=?((?=&)|(?=$))/g,'');
                query = query.replace(/^&/g,'');

                if( url.indexOf('?')>0 ){
                    url += '&' + query;
                }else{
                    url += '?' + query;
                }
                window.location.href = url;
            });

            //回车自动提交
            $('.search-form').find('input').keyup(function(event){
                if(event.keyCode===13){
                    $("#search").click();
                }
            });

            //导航高亮
            highlight_subnav('{:U('Product/'.$_type)}');
        })
    </script>
</block>
